using System.Text.RegularExpressions;

namespace PopMail
{
    public class POP3Constants
    {
        public const int M_BUFFER_SIZE = 256;
        public const int M_INVALID_MSG_COUNT = -1;
        public const string M_AUTO_RESPONSE_SUBJECT = "Acknowledgement of your travel search request";

        public const string charsToTrimOne = "\r\n";
        public const string charsToTrimTwo = ";";
        public const string charsToTrimThree = "filename=";
        public const string charsToTrimFour = "\"";

        /// <summary>
        /// Pop3 Message Parsing Regular Expressions
        /// </summary>
        public static Regex FromPattern = new Regex(@"^From:.*[ |<]([a-z|A-Z|0-9|\.|\-|_]+@[a-z|A-Z|0-9|\.|\-|_]+).*$", RegexOptions.IgnoreCase);
        public static Regex ToPattern = new Regex(@"^To:.*[ |<]([a-z|A-Z|0-9|\.|\-|_]+@[a-z|A-Z|0-9|\.|\-|_]+).*$", RegexOptions.IgnoreCase);
        public static Regex SubjectPattern = new Regex(@"^Subject: (.*)$", RegexOptions.IgnoreCase);
        public static Regex DatePattern = new Regex(@"^Date: (.*)$", RegexOptions.IgnoreCase);
        public static Regex ContentTypePattern = new Regex(@"^Content-Type: (.*)", RegexOptions.IgnoreCase);
        public static Regex BoundaryPattern = new Regex(@"^(.*)boundary=(.*)$", RegexOptions.IgnoreCase);
        public static Regex CharsetPattern = new Regex(@"^charset=(.*)$", RegexOptions.IgnoreCase);
        public static Regex ContentTransferEncodingPattern = new Regex(@"^Content-Transfer-Encoding:(.*)$", RegexOptions.IgnoreCase);
        public static Regex FileNamePattern = new Regex(@"^(.*)name=(.*)$", RegexOptions.IgnoreCase);
        public static Regex AttachmentSeperatorPattern = new Regex("^--(.*)$", RegexOptions.IgnoreCase);
   
    }

}
